
<!-- Compute Engine subnetworks partial -->
<script id="services.computeengine.projects.id.regions.id.subnetworks.partial" type="text/x-handlebars-template">
    <div id="resource-name" class="list-group-item active">
        <h4 class="list-group-item-heading">{{name}}</h4>
    </div>
    <div class="list-group-item">
        <h4 class="list-group-item-heading">Information</h4>
        <div class="list-group-item-text item-margin">Name: <span id="computeengine.projects.{{@../../key}}.regions.{{@../key}}.subnetworks.{{@key}}.name">{{name}}</span></div>
        <div class="list-group-item-text item-margin">ID: <span id="computeengine.projects.{{@../../key}}.regions.{{@../key}}.subnetworks.{{@key}}.id">{{id}}</span></div>
        <div class="list-group-item-text item-margin">Project ID: <span id="computeengine.projects.{{@../../key}}.regions.{{@../key}}.subnetworks.{{@key}}.project_id">{{project_id}}</span></div>
        <div class="list-group-item-text item-margin">Region: <span id="computeengine.projects.{{@../../key}}.regions.{{@../key}}.subnetworks.{{@key}}.region"><samp>{{region}}</samp></span></div>
        <div class="list-group-item-text item-margin">Creation Date: <span id="computeengine.projects.{{@../../key}}.regions.{{@../key}}.subnetworks.{{@key}}.creation_timestamp">{{format_date creation_timestamp}}</span></div>
        <div class="list-group-item-text item-margin">IP Range: <span id="computeengine.projects.{{@../../key}}.regions.{{@../key}}.subnetworks.{{@key}}.ip_range"><samp>{{ip_range}}</samp></span></div>
        <div class="list-group-item-text item-margin">Gateway Address: <span id="computeengine.projects.{{@../../key}}.regions.{{@../key}}.subnetworks.{{@key}}.gateway_address"><samp>{{gateway_address}}</samp></span></div>
        <div class="list-group-item-text item-margin">Private Google Access: <span id="computeengine.projects.{{@../../key}}.regions.{{@../key}}.subnetworks.{{@key}}.private_ip_google_access_disabled">{{convert_bool_to_enabled private_ip_google_access}}</span></div>
        <div class="list-group-item-text item-margin">VPC Flow Logs: <span id="computeengine.projects.{{@../../key}}.regions.{{@../key}}.subnetworks.{{@key}}.flowlogs_enabled">{{flowlogs_enabled}}</span></div>
    </div>
    <div class="list-group-item">
        <h4 class="list-group-item-heading accordion-heading">Compute Engine Instances
            {{> count_badge count=(count_vpc_instances instances) target=(concat '#services.compouteengine.projects' project 'regions' @../../key 'subnetworks' @key 'instances')}}
        </h4>
        <div id="computeengine.projects.{{@../../key}}.regions.{{@../key}}.subnetworks.{{@key}}..instances" class="accordion-body">
            <div class="accordion-inner">
                <ul>
                    {{#each instances}}
                    <li><a href="javascript:showObject('services.computeengine.projects.{{@../../../key}}.zones.{{instance_zone}}.instances.{{instance_id}}')">{{getValueAt 'services.computeengine.projects' @../../../key 'zones' instance_zone 'instances' instance_id 'name'}}</a></li>
                    {{/each}}
                </ul>
            </div>
        </div>
    </div>
</script>

<script>
    Handlebars.registerPartial("services.computeengine.projects.id.regions.id.subnetworks", $("#services\\.computeengine\\.projects\\.id\\.regions\\.id\\.subnetworks\\.partial").html());
</script>

<!-- Single computeengine subnetwork template -->
<script id="single_computeengine_subnetwork-template" type="text/x-handlebars-template">
    {{> modal-template template='services.computeengine.projects.id.regions.id.subnetworks'}}
</script>
<script>
    var single_computeengine_subnetwork_template = Handlebars.compile($("#single_computeengine_subnetwork-template").html());
</script>
